<template>
	<view>
		<view class="itemZhaop">
			<view style="width: 70%;" @click="toGeRenXinXi">
				<view class="nameZP" style="margin-bottom: 20rpx;">{{renCaiInfo.talentName}}</view>
				<view class="gongsi">{{renCaiInfo.phone}} | {{renCaiInfo.age}}岁</view>
				<view class="gongsi" style="margin-bottom: 30rpx;">备注：{{renCaiInfo.remark}}</view>
				<!-- <view class="pic">
					<u--image shape="circle" :showLoading="true" src="http://gips3.baidu.com/it/u=3886271102,3123389489&fm=3028&app=3028&f=JPEG&fmt=auto?w=1280&h=960" width="30px"
						height="30px"></u--image>
				</view> -->
			</view>
			<view style="width: 30%;">
				<view class="money" style="margin-top: 40rpx;">{{renCaiInfo.expectationPostName}}</view>
				<view class="need">{{renCaiInfo.expectationSalary}}K</view>
			</view>
		</view>
		<DaDropdownVue2 :dropdownMenu="dropdownMenuList" themeColor="#007aff"
			textColor="#333333" :duration="300" @confirm="handleConfirm" @close="handleClose"
			@open="handleOpen">
		</DaDropdownVue2>
		<scroll-view scroll-y @scrolltolower="loadMore" :style="{'height': `calc(100vh - ${upx2px}px)`}"
			:scroll-with-animation="true">
			<!-- 内容区域 -->
			<view v-for="item in gangWeiList">
				<!-- <jobDetail :jobInfo="item"></jobDetail> -->
				<resume :showBtn="true" :list="item">
					
				</resume>
			</view>
			<Loading :status='status'></Loading>

		</scroll-view>
	</view>
</template>

<script>
	import {postPage} from '@/api/zhiwei/zhiwei.js'
	import DaDropdownVue2 from '@/components/da-dropdown-vue2/index.vue'
	import resume from '@/components/common/resume/resume.vue'
	import jobDetail from '@/components/common/jobDetail/jobDetail.vue'
	import Loading from '@/components/loading/loading.vue'
	export default { 
		name: "tuiJianGangWei",
		components: {
			jobDetail,
			Loading,
			resume,
			DaDropdownVue2
		},
		data() {
			return {
				status: 'loadmore',
				renCaiInfo:Object,
				upx2px:uni.upx2px(400),
				gangWeiList:[],
				gangWeiQueryParams:{
					pageNum:1,
					pageSize:10
				},
				dropdownMenuList: [{
						title: '企业筛选',
						type: 'cell',
						prop: 'god1',
						showAll: true,
						showIcon: true,
						// value: '2', // 默认内容2
						options: [{
								label: '日结',
								value: 0
							},
							{
								label: '月结',
								value: 1
							},
						],
					},
					{
						title: '职业筛选',
						type: 'cell',
						prop: 'god2',
						showAll: true,
						showIcon: true,
						// value: '2', // 默认内容2
						options: [{
								label: '日结',
								value: 0
							},
							{
								label: '月结',
								value: 1
							},
						],
					},
					{
						title: '薪资范围',
						type: 'cell',
						prop: 'god3',
						showAll: true,
						showIcon: true,
						// value: '2', // 默认内容2
						options: [{
								label: '日结',
								value: 0
							},
							{
								label: '月结',
								value: 1
							},
						],
					}
				]
			}
		},
		onLoad(options) {
			console.log(options)
			this.renCaiInfo = JSON.parse(decodeURIComponent(options.renCaiInfo))
			console.log(this.renCaiInfo,"rencaiInfo")
		},
		methods: {
			handleConfirm(v) {
				console.log('handleConfirm ==>', v)
			},
			handleClose(v) {
				console.log('handleClose ==>', v)
			},
			handleOpen(v) {
				console.log('handleOpen ==>', v)
			},
			loadMore() {
				if(this.status == 'nomore')return
				console.log('底部触发')
				this.status = 'loading'
				this.gangWeiQueryParams.pageNum += 1
				this.postPage(this.gangWeiQueryParams)
			},
			async postPage(data){
				let res = await postPage(data)
				if(res.code == 200){
					if(this.gangWeiList.length < res.total){
						this.gangWeiList = [...this.gangWeiList,...res.rows]
					}else{
						this.status = "nomore"
					}
				}
				console.log(res,"职位列表")
				console.log(res.data,"职位列表")
			},
		},
		mounted() {
			this.postPage(this.gangWeiQueryParams)
		},
	}
</script>

<style lang="scss">
	.itemZhaop {
		display: flex;
		padding: 0 20rpx;
	}

	.nameZP {
		font-size: 36rpx;
		color: #323232;
		padding: 8rpx 0;
		font-weight: 600;
		padding-top: 30rpx;

	}

	.gongsi {
		font-size: 24rpx;
		color: #717171;
		padding: 8rpx 0;
	}

	.money {
		padding: 8rpx 0;
		color: #31a889;
		text-align: right;
		font-weight: 600;
	}

	.need {
		font-size: 24rpx;
		color: #717171;
		padding: 8rpx 0;
		text-align: right;
	}
</style>